<%@ Page Language="C#" AutoEventWireup="true" CodeFile="files.aspx.cs" Inherits="Private_Asset_Files" %>
<%@ Register TagPrefix="Flux" Namespace="Deepcode.Flux.Core.UI.Controls" Assembly="Deepcode.Flux.Core" %>
<html>
<head runat="server">
	<link href="../../Asset/Style/GeneralStyle.css" rel="stylesheet" type="text/css" />
	<link href="localstyle.css" rel="stylesheet" type="text/css" />
	<script language="javascript">
	function reloadNow()
	{
		var scrollPos = "";
		if( document.body )
			scrollPos = document.body.scrollLeft + "," + document.body.scrollTop;
		else
			scrollPos = window.pageXOffset + "," + window.pageYOffset;

		self.location.href = "files.aspx?path=<%=Path%>&scrollTo=" + scrollPos;
	}
	function ReturnFile( f )
	{
		if( parent != null ) 
			if( parent.ReturnFile != null )
				parent.ReturnFile( f );
	}
	</script>
</head>
<body class="nopad">
<form id="form1" runat="server">
<Flux:HostTable runat="server">
	
<Flux:Section runat="server">
<Flux:ShadePadBox runat="server" CssClass="infoarea">

<table width="100%" cellspacing="0" cellpadding="3" border="0">
<tr><td><asp:TextBox runat="server" ID="filemask" Width="100px" cssclass="small"/></td>
	<td><asp:Button runat="server" ID="applymask" Text="Apply" cssclass="smallbutton" OnClick="btnApplyMaskClick"/></td>
	<td width="100%"><asp:DropDownList runat="server" ID="availablemasks" Width="100%" AutoPostBack="true" cssclass="small"/></td>
	</tr>
</table>

</Flux:ShadePadBox>
</Flux:Section>

<Flux:Section runat="server" Title="" id="mainPanel" WithFooter="true">
<Flux:StandardDataGrid runat="server" CellPadding="4" ID="_data" ClickRowSelect="true" ClickRowDeselect="true" AllowPaging="false" DataKeyField="Name" AllowSorting="true" CurrentSort="Name" CurrentSortDirection="ASCENDING">
	<Columns>
		
		<asp:TemplateColumn 
			ItemStyle-Width="16" 
			SortExpression="Extension" 
			HeaderText="I">
			<ItemTemplate>
				<img runat="server" src="<%#GetIcon( Container.DataItem ) %>"/>
			</ItemTemplate>
		</asp:TemplateColumn>
		
		<asp:BoundColumn 
			SortExpression="Name" DataField="Name" 
			ReadOnly="true" HeaderText="File"></asp:BoundColumn>

		<asp:TemplateColumn 
			ItemStyle-Width="100"
			SortExpression="Length" 
			HeaderText="Size">
			<ItemTemplate>
				<%#GetLength( Container.DataItem ) %>
			</ItemTemplate>
		</asp:TemplateColumn>

		<asp:TemplateColumn 
			ItemStyle-Width="100"
			HeaderText="Options">
			<ItemTemplate>
				<%#GetSelectLink( Container.DataItem )%>
			</ItemTemplate>
		</asp:TemplateColumn>
		
	</Columns>
</Flux:StandardDataGrid>
</Flux:Section>

</Flux:HostTable>
</form>
</body>
</html>
